

public class Test {
    public static void main(String[] args) {
        CPU cpu=new CPU();
        HardDisk HD=new HardDisk();
        cpu.setSpeed(2200);
        HD.setAmount(200);
        PC pc=new PC();
        pc.setCPU(cpu);
        pc.setHardDisk(HD);
        pc.show();
        String s=new String();
        s=cpu.toString();
        System.out.println(s);
        s=HD.toString();
        System.out.println(s);
        s=pc.toString();
        System.out.println(s);
        boolean b;
        Object vitualPC=new Object();
        vitualPC=pc;
        b=pc.equals(vitualPC);
        System.out.println(b);
        b=cpu.equals(vitualPC);
        System.out.println(b);
        b=HD.equals(vitualPC);
        System.out.println(b);
    }
}
